package bank

// sync.Mutex实现bank

import "sync"

var (
	mu        sync.Mutex // guards balance03
	balance03 int
)

func Deposit03(amount int) {
	mu.Lock()
	balance03 = balance03 + amount
	mu.Unlock()
}

func Balance03() int {
	mu.Lock()
	b := balance03
	defer mu.Unlock()
	return b
}
